﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_qlnewstypelang : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {

    }
    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {

    }
    protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
    {

    }
    protected void addbt_Click(object sender, EventArgs e)
    {
        SqlDataSource1.Insert();
        SqlDataSource1.DataBind();
        Response.Write("<script>alert('Insert Thành Công')</script>");
        this.title.Text = "";
        this.menu.Text = "";
        this.ddlID.SelectedIndex = -1;
        this.ddlLang.SelectedIndex = -1;
        reset();
    }
    private void reset()
    {
        SqlDataSource2.DataBind();
        SqlDataSource3.DataBind();
        ddlID.DataBind();
    }
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        e.Cancel = true;
        Response.Write(Common.confirmDelete(null));
    }
}